#pragma once

#include "ScriptCompiler/AST/ExpressionNode.h"
#include "ScriptCompiler/AST/SentenceNode.h"

class CTypeNode;
class CDecoratorNode;
class CVariableDeclarationNode : public CSentenceNode
{
public:
    CVariableDeclarationNode(std::weak_ptr<CScriptFileContext> InFile)
        : CSentenceNode(InFile, EASTNodeType::VariableDeclaration)
    {
    }

    //decorator 
    TOptional<std::shared_ptr<CDecoratorNode>> Decorator;

    //variable type
    std::shared_ptr<CTypeNode> Type;

    //variable name
    std::shared_ptr<CScriptToken> Name;
    
    std::shared_ptr<CExpressionNode> InitialValue;


    virtual void DebugPrint(int32_t InDepth) override;

    virtual std::shared_ptr<CScriptToken> GetFirstToken() override;
};